📖 Bundle Deployment Configuration#2528
📖 Bundle Deployment Configuration#2528openshift-merge-bot[bot] merged 1 commit intooperator-framework:mainfrom
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive documentation for the Bundle Deployment Configuration feature, which enables users to customize operator deployment settings in OLMv1. The feature provides parity with OLMv0's Subscription.spec.config functionality, allowing customization of resource requirements, node placement, environment variables, storage, and annotations.
Changes:
- Added detailed documentation explaining the Bundle Deployment Configuration feature and its use cases
- Provided configuration examples for environment variables, resources, node placement (selectors, tolerations, affinity), storage, and annotations
- Included migration guide from OLM v0 to OLM v1
- Documented validation schema generation and error handling
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| config: | ||
| inline: |
There was a problem hiding this comment.
The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.
| config: | ||
| env: |
There was a problem hiding this comment.
The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.
| custom.annotation/key: "value" | ||
| ``` | ||
|
|
||
| **Behavior**: Annotations are merged with existing annotations. If the same annotation key exists in both the bundle and the configuration, the bundle's annotation value takes precedence. |
There was a problem hiding this comment.
The behavior description for annotations is incorrect. According to the implementation in internal/operator-controller/rukpak/render/registryv1/generators/generators.go lines 772-796, existing deployment and pod annotations take precedence over config annotations (no override). The documentation states the opposite - that "the bundle's annotation value takes precedence". The correct behavior is that annotations from the bundle are NOT overridden by the deploymentConfig annotations.
| **Behavior**: Annotations are merged with existing annotations. If the same annotation key exists in both the bundle and the configuration, the bundle's annotation value takes precedence. | |
| **Behavior**: Annotations are merged with existing annotations. If the same annotation key exists in both the bundle and the `deploymentConfig`, the existing annotation from the bundle is preserved and the `deploymentConfig` value is ignored. |
| config: | ||
| inline: |
There was a problem hiding this comment.
The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.
| catalog: | ||
| packageName: my-operator | ||
| channel: stable | ||
| config: |
There was a problem hiding this comment.
The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.
| config: | |
| config: | |
| configType: Inline |
| config: | ||
| inline: |
There was a problem hiding this comment.
The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.
| catalog: | ||
| packageName: production-operator | ||
| version: 1.2.3 | ||
| config: |
There was a problem hiding this comment.
The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.
| config: | |
| config: | |
| configType: Inline |
| !!! note | ||
| This feature is still in `alpha` and the `DeploymentConfig` feature gate must be enabled to make use of it. | ||
| See the instructions below on how to enable it. |
There was a problem hiding this comment.
The note incorrectly states that the DeploymentConfig feature gate must be enabled. No such feature gate exists in the codebase (verified in internal/operator-controller/features/features.go). The deploymentConfig functionality appears to be available by default without any feature gate requirement.
| ## Enabling the Feature Gate | ||
|
|
||
| To enable the Bundle Deployment Configuration feature gate, you need to patch the `operator-controller-controller-manager` deployment in the `olmv1-system` namespace. This will add the `--feature-gates=DeploymentConfig=true` argument to the manager container. | ||
|
|
||
| 1. **Patch the deployment:** | ||
|
|
||
| ```bash | ||
| kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=DeploymentConfig=true"}]' | ||
| ``` | ||
|
|
||
| 2. **Wait for the controller manager pods to be ready:** | ||
|
|
||
| ```bash | ||
| kubectl -n olmv1-system wait --for=condition=ready pods -l app.kubernetes.io/name=operator-controller | ||
| ``` | ||
|
|
||
| Once the above wait condition is met, the `DeploymentConfig` feature gate should be enabled in operator-controller. |
There was a problem hiding this comment.
The documentation incorrectly states that a DeploymentConfig feature gate must be enabled. After reviewing the codebase, no such feature gate exists in internal/operator-controller/features/features.go. The deploymentConfig functionality appears to be always available in the registry+v1 bundle config schema (internal/operator-controller/rukpak/bundle/registryv1.go) without any feature gate requirement. This entire section about enabling the feature gate should be removed or corrected.
|
|
||
| ## Migration from OLM v0 | ||
|
|
||
| If you're migrating from OLM v0, you can directly transfer your `Subscription.spec.config` settings to the `deploymentConfig` object within `ClusterExtension.spec.config.inline`. The structure is identical. |
There was a problem hiding this comment.
The statement "The structure is identical" could be clearer. While the structure of the configuration fields (env, resources, etc.) is identical, the location differs: in OLM v0 these fields are directly under Subscription.spec.config, whereas in OLM v1 they're nested under ClusterExtension.spec.config.inline.deploymentConfig. Consider rephrasing to: "The structure of the configuration fields is identical - simply nest your Subscription.spec.config settings under the deploymentConfig key within ClusterExtension.spec.config.inline."
| If you're migrating from OLM v0, you can directly transfer your `Subscription.spec.config` settings to the `deploymentConfig` object within `ClusterExtension.spec.config.inline`. The structure is identical. | |
| If you're migrating from OLM v0, the structure of the configuration fields is identical — simply nest your `Subscription.spec.config` settings under the `deploymentConfig` key within `ClusterExtension.spec.config.inline`. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2528 +/- ##
==========================================
- Coverage 72.04% 68.59% -3.46%
==========================================
Files 103 131 +28
Lines 8690 9288 +598
==========================================
+ Hits 6261 6371 +110
- Misses 1946 2432 +486
- Partials 483 485 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| ## Description | ||
|
|
||
| !!! note | ||
| This feature is still in `alpha` and the `DeploymentConfig` feature gate must be enabled to make use of it. |
There was a problem hiding this comment.
Do we use the alpha verbiage? Or is it experimental?
There was a problem hiding this comment.
Changed it to experimental
|
/lgtm We should probably ask @michaelryanpeter to 👀 too |
|
A PR description would be nice =D |
Adds user-facing documentation for the Bundle Deployment Configuration feature, which provides feature parity with OLM v0's `Subscription.spec.config` (SubscriptionConfig). **What's included:** - How to enable the `DeploymentConfig` feature gate - Complete configuration reference for all deployment customization options: - Environment variables (`env`, `envFrom`) - Resource requirements (`resources`) - Node placement (`nodeSelector`, `tolerations`, `affinity`) - Storage (`volumes`, `volumeMounts`) - Annotations - Migration guide from OLM v0's SubscriptionConfig to OLM v1 - Validation details including how the JSON schema is generated for registry+v1 bundles - Troubleshooting and verification steps **Related work:** - RFC: [Deployment Configuration (achieving feature parity with OLMv0's SubscriptionConfig)](https://docs.google.com/document/d/18O4qBvu5I4WIJgo5KU1opyUKcrfgk64xsI3tyXxmVEU/edit?usp=sharing) - Implementation: - operator-framework#2454 (schema generation and validation) - operator-framework#2469 (renderer support) - operator-framework#2482 (controller integration) - operator-framework#2527 (DeploymentConfig feature gate) This documentation is placed in `docs/draft/howto/` as the feature is currently `experimental` and requires the `DeploymentConfig` feature gate to be enabled.
86ce4b8 to
e2935d0
Compare
|
Added PR description. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
a9a9b40
into
operator-framework:main
Description
Adds user-facing documentation for the Bundle Deployment Configuration feature,
which provides feature parity with OLM v0's
Subscription.spec.config(SubscriptionConfig).What's included:
DeploymentConfigfeature gateenv,envFrom)resources)nodeSelector,tolerations,affinity)volumes,volumeMounts)Related work:
This documentation is placed in
docs/draft/howto/as the feature is currentlyexperimentaland requires the
DeploymentConfigfeature gate to be enabled.Reviewer Checklist